#pragma once

#include "Common.h"
#include "Vector3.h"
#include "Quaternion.h"

class Actor
{
protected:
	Actor();
public:
	virtual ~Actor();
protected:
	virtual void Initialize();
	virtual void LoadContent();
	virtual void Update(float elapsedTime);
	virtual void Draw();
	virtual void UnloadContent();
public:
	const Actor*			GetParent() const;
	const std::list<Actor*> GetChildren() const;
	const bool				HasParent() const;
	const Vector3f			GetPosition() const;
	const Vector3f			GetAbsolutePosition() const;
	const Quaternion		GetRotation() const;
	const Quaternion		GetAbsoluteRotation() const;
	const Vector3f			GetVelocity() const;
	const bool				IsVisible() const;
	const bool				GetMovesWithParent() const;
	const bool				GetRotatesWithParent() const;
public:
	void SetParent(Actor* parent);
	void SetPosition(const Vector3f& position);
	void SetRotation(const Quaternion& quaternion);
	void SetVelocity(const Vector3f& velocity);
	void SetVisible(bool visible);
	void SetMovesWithParent(bool movesWithParent);
	void SetRotatesWithParent(bool rotatesWithParent);
private:
	Actor*				m_pParent;
	std::list<Actor*>	m_pChildren;
	Vector3f			m_vPosition;
	Quaternion			m_qRotation;
	Vector3f			m_vVelocity;
	bool				m_bIsVisible;
	bool				m_bMovesWithParent;
	bool				m_bRotatesWithParent;
};
